unit constants;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, Graphics;

const
  FACE_WIDTH = 144;
  FACE_HEIGHT = 144;

  TILE_TYPE_A = 0;
  TILE_TYPE_B = 1;
  TILE_TYPE_C = 2;
  TILE_TYPE_D = 3;
  TILE_TYPE_E = 4;
  TILE_TYPE_REGION = 5;

  LAYER_ALL = -1;
  LAYER_EVENTS = -2;

  TILE_ID_ERASER = -1;

  ParameterColours: array [0..7] of TColor = (
    $6080d0, //max HP
    $e08050, //max MP
    $6040c0, //attack power
    $60b090, //defense power
    $b050c0, //magic attack power
    $40a040, //magic defense power
    $e0b050, //agility
    $40b0d0 //luck
  );

  ENEMY_ACTION_CONDITION_ALWAYS = 0;
  ENEMY_ACTION_CONDITION_TURN = 1;
  ENEMY_ACTION_CONDITION_HP = 2;
  ENEMY_ACTION_CONDITION_MP = 3;
  ENEMY_ACTION_CONDITION_STATE = 4;
  ENEMY_ACTION_CONDITION_PARTY_LV = 5;
  ENEMY_ACTION_CONDITION_SWITCH = 6;

  DROP_ITEM_KIND_NONE = 0;
  DROP_ITEM_KIND_ITEM = 1;
  DROP_ITEM_KIND_WEAPON = 2;
  DROP_ITEM_KIND_ARMOUR = 3;

  SCREEN_HEIGHT = 624;
  SCREEN_WIDTH = 816;

  TILE_ID_B      = 0;
  TILE_ID_C      = 256;
  TILE_ID_D      = 512;
  TILE_ID_E      = 768;
  TILE_ID_A5     = 1536;
  TILE_ID_A1     = 2048;
  TILE_ID_A2     = 2816;
  TILE_ID_A3     = 4352;
  TILE_ID_A4     = 5888;
  TILE_ID_MAX    = 8192;
  TABLE_EDGE_VIRTUAL_ID = 10000;

  {Page 1}
  SHOW_MESSAGE_START_EC_CODE = 101;
  SHOW_MESSAGE_LINE_EC_CODE = 401;
  SHOW_CHOICES_START_EC_CODE = 102;
  SHOW_CHOICES_BRANCH_EC_CODE = 402;
  SHOW_CHOICES_CANCEL_BRANCH_EC_CODE = 403;
  SHOW_CHOICES_END_EC_CODE = 404;
  INPUT_NUMBER_EC_CODE = 103;
  SELECT_ITEM_EC_CODE = 104;
  SCROLLING_TEXT_START_EC_CODE = 105;
  SCROLLING_TEXT_LINE_EC_CODE = 405;

  SET_SWITCHES_EC_CODE = 121;
  SET_VARIABLES_EC_CODE = 122;
  SET_SELF_SWITCH_EC_CODE = 123;
  CONTROL_TIMER_EC_CODE = 124;

  CONDITIONAL_BRANCH_IF_EC_CODE = 111;
  CONDITIONAL_BRANCH_ELSE_EC_CODE = 411;
  CONDITIONAL_BRANCH_END_EC_CODE = 412;
  LOOP_EC_CODE = 112;
  LOOP_END_EC_CODE = 413;
  BREAK_LOOP_EC_CODE = 113;
  EXIT_EVENT_PROCESSING_EC_CODE = 115;
  COMMON_EVENT_EC_CODE = 117;
  LABEL_EC_CODE = 118;
  GOTO_EC_CODE = 119;
  COMMENT_EC_CODE = 108;
  COMMENT_CONTINUATION_EC_CODE = 408;

  CHANGE_GOLD_EC_CODE = 125;
  CHANGE_ITEMS_EC_CODE = 126;
  CHANGE_WEAPONS_EC_CODE = 127;
  CHANGE_ARMOURS_EC_CODE = 128;
  CHANGE_PARTY_MEMBER_EC_CODE = 129;

  CHANGE_ACTOR_HP_EC_CODE = 311;
  CHANGE_ACTOR_MP_EC_CODE = 312;
  CHANGE_ACTOR_TP_EC_CODE = 326;
  CHANGE_ACTOR_STATE_EC_CODE = 313;
  COMPLETE_ACTOR_RECOVER_EC_CODE = 314;
  CHANGE_EXPERIENCE_EC_CODE = 315;
  CHANGE_LEVEL_EC_CODE = 316;
  CHANGE_PARAM_EC_CODE = 317;
  CHANGE_SKILL_EC_CODE = 318;
  CHANGE_EQUIPMENT_EC_CODE = 319;
  CHANGE_NAME_EC_CODE = 320;
  CHANGE_CLASS_EC_CODE = 321;
  CHANGE_NICKNAME_EC_CODE = 324;
  CHANGE_PROFILE_EC_CODE = 325;

  {Page 2}
  TRANSFER_PLAYER_EC_CODE = 201;
  SET_VEHICLE_LOCATION_EC_CODE = 202;
  SET_EVENT_LOCATION_EC_CODE = 203;
  SCROLL_MAP_EC_CODE = 204;
  SET_MOVEMENT_ROUTE_EC_CODE = 205;
  SET_MOVEMENT_ROUTE_SUBCOMMAND_EC_CODE = 505;
  GET_ON_OFF_VEHICLE_EC_CODE = 206;

  CHANGE_PLAYER_VISIBILITY_EC_CODE = 211;
  CHANGE_PLAYER_FOLLOWERS_EC_CODE = 216;
  GATHER_FOLLOWERS_EC_CODE = 217;
  SHOW_ANIMATION_EC_CODE = 212;
  SHOW_BALLOON_ICON_EC_CODE = 213;
  ERASE_EVENT_EC_CODE = 214;

  SHOW_PICTURE_EC_CODE = 231;
  MOVE_PICTURE_EC_CODE = 232;
  ROTATE_PICTURE_EC_CODE = 233;
  TINT_PICTURE_EC_CODE = 234;
  ERASE_PICTURE_EC_CODE = 235;

  WAIT_EC_CODE = 230;

  FADEOUT_SCREEN_EC_CODE = 221;
  FADEIN_SCREEN_EC_CODE = 222;
  TINT_SCREEN_EC_CODE = 223;
  FLASH_SCREEN_EC_CODE = 224;
  SHAKE_SCREEN_EC_CODE = 225;
  SET_WEATHER_EFFECT_EC_CODE = 236;

  PLAY_BGM_EC_CODE = 241;
  FADEOUT_BGM_EC_CODE = 242;
  SAVE_BGM_EC_CODE = 243;
  REPLAY_BGM_EC_CODE = 244;
  PLAY_BGS_EC_CODE = 245;
  FADEOUT_BGS_EC_CODE = 246;
  PLAY_ME_EC_CODE = 249;
  PLAY_SE_EC_CODE = 250;
  STOP_SE_EC_CODE = 251;
  PLAY_MOVIE_EC_CODE = 261;

  {Page 3}
  BATTLE_PROCESSING_EC_CODE = 301;
  BATTLE_PROCESSING_WIN_EC_CODE = 601;
  BATTLE_PROCESSING_ESCAPE_EC_CODE = 602;
  BATTLE_PROCESSING_LOSE_EC_CODE = 603;
  BATTLE_PROCESSING_END_EC_CODE = 604;

  SHOP_PROCESSING_EC_CODE = 302;
  SHOP_PROCESSING_LINE_EC_CODE = 605;

  NAME_INPUT_PROCESSING_EC_CODE = 303;
  OPEN_MENU_SCREEN_EC_CODE = 351;
  OPEN_SAVE_SCREEN_EC_CODE = 352;
  GAME_OVER_EC_CODE = 353;
  RETURN_TO_TITLE_SCREEN_EC_CODE = 354;

  CHANGE_BATTLE_BGM_EC_CODE = 132;
  CHANGE_VICTORY_ME_EC_CODE = 133;
  CHANGE_DEFEAT_ME_EC_CODE = 139;
  CHANGE_VEHICLE_BGM_EC_CODE = 140;
  CHANGE_SAVE_ACCESS_EC_CODE = 134;
  CHANGE_MENU_ACCESS_EC_CODE = 135;
  CHANGE_ENCOUNTER_EC_CODE = 136;
  CHANGE_FORMATION_ACCESS_EC_CODE = 137;
  CHANGE_WINDOW_COLOUR_EC_CODE = 138;
  CHANGE_ACTOR_IMAGES_EC_CODE = 322;
  CHANGE_VEHICLE_IMAGE_EC_CODE = 323;

  CHANGE_MAP_NAME_DISPLAY_EC_CODE = 281;
  CHANGE_TILESET_EC_CODE = 282;
  CHANGE_BATTLEBACK_EC_CODE = 283;
  CHANGE_PARALLAX_EC_CODE = 284;
  GET_LOCATION_INFO_EC_CODE = 285;

  CHANGE_ENEMY_HP_EC_CODE = 331;
  CHANGE_ENEMY_MP_EC_CODE = 332;
  CHANGE_ENEMY_TP_EC_CODE = 342;
  CHANGE_ENEMY_STATE_EC_CODE = 333;
  COMPLETE_ENEMY_RECOVERY_EC_CODE = 334;
  ENEMY_APPEAR_EC_CODE = 335;
  ENEMY_TRANSFORM_EC_CODE = 336;
  SHOW_BATTLE_ANIMATION_EC_CODE = 337;
  FORCE_ACTION_EC_CODE = 339;
  ABORT_BATTLE_EC_CODE = 340;

  SCRIPT_EC_CODE = 355;
  SCRIPT_LINE_EC_CODE = 655;
  PLUGIN_COMMAND_EC_CODE = 356;

function GetMaxParamValue(ParamId: Integer): Integer;

resourcestring
  rsScopeNone = 'None';
  rsScopeSingleEnemy = 'Single enemy';
  rsScopeAllEnemies = 'All enemies';
  rsScope1RandomEnemy = '1 random enemy';
  rsScope2RandomEnemies = '2 random enemies';
  rsScope3RandomEnemies = '3 random enemies';
  rsScope4RandomEnemies = '4 random enemies';
  rsScope5RandomEnemies = '1 ally';
  rsScopeAllAllies = 'All allies';
  rsScope1UnconsciousAlly = '1 ally (unconscious)';
  rsScopeAllUnconsciousAllies = 'All allies (unconscious)';
  rsScopeUser = 'The user';

  rsOccasionAlways = 'Always available';
  rsOccasionBattle = 'Only in battle';
  rsOccasionMap = 'Only from map menu';
  rsOccasionNone = 'Not available directly';

  rsHitTypeCertain = 'Certain hit';
  rsHitTypePhysical = 'Physical hit';
  rsHitTypeMagical = 'Magical hit';

  rsDamageTypeNone = 'None';
  rsDamageTypeDamageHp = 'Damage HP';
  rsDamageTypeDamageMp = 'Damage MP';
  rsDamageTypeHealHp = 'Heal HP';
  rsDamageTypeHealMp = 'Heal MP';
  rsDamageTypeStealHp = 'Steal HP';
  rsDamageTypeStealMp = 'Steal MP';

  AnimationNormalAttack = 'Normal attack animation';
  AnimationNone = 'No animation';

  rsBlendModeNormal = 'Normal';
  rsBlendModeAdditive = 'Additive';
  rsBlendModeMultiply = 'Multiply';
  rsBlendModeScreen = 'Screen';




  rsUnknownEc = 'Unknown event command';
  rsUnknownParameter = 'unknown parameter';
  rsCode = '(%d)';
  rsShowMessageEc = 'Text';
  rsShowMessageFace = '%s(%d)';
  rsShowMessageNoFace = 'no face';
  rsShowMessageInWindow = 'in window';
  rsShowMessageDimmedBackgroud = 'dimmed background';
  rsShowMessageTransparentBackgroud = 'transparent background';

  rsShowChoicesEc = 'Show choices';
  rsShowChoicesWhenEc = 'When';
  rsShowChoicesCancelBranchEc = 'When cancelled';
  rsShowChoicesEndEc = 'End choices';

  rsInputNumberEc = 'Input number';
  rsInputNumberEc_digits = '%d digit(s)'; { TODO: normal support for plural rules }

  rsSelectItem = 'Select item';

  rsScrollingText = 'Scroll text';
  rsScrollingText_speed = 'speed %d';
  rsScrollingText_noFastForward = 'no fast forward';

  rsSetSwitches = 'Set switches';
  rsSetSwitches_SingleOn = 'turn {%s} ON';
  rsSetSwitches_ManyOn = 'turn %s ... %s ON';
  rsSetSwitches_SingleOff = 'turn {%s} OFF';
  rsSetSwitches_ManyOff = 'turn %s ... %s OFF';

  rsSetVariables = 'Set variables';
  rsSetVariables_singleVar = '%s';
  rsSetVariables_manyVars = '%s ... %s';

  rsSetVariables_set = '%0-s := %1-s';
  rsSetVariables_add = '%0-s += %1-s';
  rsSetVariables_sub = '%0-s -= %1-s';
  rsSetVariables_mul = '%0-s *= %1-s';
  rsSetVariables_div = '%0-s /= %1-s';
  rsSetVariables_mod = '%0-s %= %1-s';

  rsSetVariables_setSingleItem = 'Set';
  rsSetVariables_addSingleItem = '+';
  rsSetVariables_subSingleItem = '-';
  rsSetVariables_mulSingleItem = '*';
  rsSetVariables_divSingleItem = '/';
  rsSetVariables_modSingleItem = 'Modulo';

  rsSetVariables_indirect = '{%d}';
  rsSetVariables_random = 'Random %d ... %d';
  rsSetVariables_item = 'Number of items %s';
  rsSetVariables_weapons = 'Number of weapons %s';
  rsSetVariables_armours = 'Number of armours %s';
  rsSetVariables_hero = 'Hero %s data: %s';
  rsSetVariables_enemy = 'Enemy %s data: %s';
  rsSetVariables_char = 'Character %s data: %s';
  rsSetVariables_char_mapX = 'map X';
  rsSetVariables_char_mapY = 'map Y';
  rsSetVariables_char_direction = 'direction';
  rsSetVariables_char_screenX = 'screen X';
  rsSetVariables_char_screenY = 'screen Y';
  rsSetVariables_partyMember = 'Actor ID of party member''s #%d';
  rsSetVariables_mapId = 'map ID';
  rsSetVariables_numPartyMembers = 'num. of party members';
  rsSetVariables_gold = 'gold';
  rsSetVariables_steps = 'steps';
  rsSetVariables_playTime = 'play time';
  rsSetVariables_timer = 'timer';
  rsSetVariables_saveCount = 'save count';
  rsSetVariables_battleCount = 'battle count';
  rsSetVariables_victoryCount = 'victory count';
  rsSetVariables_escapeCount = 'escape count';

  rsSetSelfSwitch = 'Set a self-switch';
  rsSetSelfSwitch_on = 'turn %s ON';
  rsSetSelfSwitch_off = 'turn %s OFF';

  rsControlTimer = 'Control timer';
  rsControlTimer_start = 'start timer';
  rsControlTimer_stop = 'stop timer';
  rsControlTimer_sec = '%d sec.';
  rsControlTimer_min = '%d min.';
  rsControlTimer_minsec = '%d min. %d sec.';

  rsConditionalBranch = 'If';
  rsConditionalBranch_else = 'Else';
  rsConditionalBranch_end = 'End';

  rsConditionalBranch_isOn = 'is ON';
  rsConditionalBranch_isOff = 'is OFF';
  rsConditionalBranch_switchIsOn = 'switch %s is ON';
  rsConditionalBranch_switchIsOff = 'switch %s is OFF';
  rsConditionalBranch_varIndirect = 'var. referenced in #%d';
  rsConditionalBranch_varEq = 'var. %s = %s';
  rsConditionalBranch_varGtEq = 'var. %s ≤ %s';
  rsConditionalBranch_varLtEq = 'var. %s ≥ %s';
  rsConditionalBranch_varGt = 'var. %s < %s';
  rsConditionalBranch_varLt = 'var. %s > %s';
  rsConditionalBranch_varNeq = 'var. %s ≠ %s';
  rsConditionalBranch_selfSwitchIsOn = 'self-switch %s is ON';
  rsConditionalBranch_selfSwitchIsOFf = 'self-switch %s is OFF';
  rsConditionalBranch_timerGtEq = 'time on timer ≥ %s';
  rsConditionalBranch_timerLtEq = 'time on timer ≤ %s';

  rsConditionalBranch_actorInParty = '%s is in the party';
  rsConditionalBranch_actorName = '%s''s name is %s';
  rsConditionalBranch_actorClass = '%s''s class is %s';
  rsConditionalBranch_actorSkills = '%s knows skill %s';
  rsConditionalBranch_actorWeapon = '%s has a weapon %s equipped';
  rsConditionalBranch_actorArmour = '%s has an armour %s equipped';
  rsConditionalBranch_actorState = '%s has state %s';

  rsConditionalBranch_enemyAppeared = '%s appeared';
  rsConditionalBranch_enemyState = '%s has state %s';

  rsConditionalBranch_charUp = '%s is looking up';
  rsConditionalBranch_charDown = '%s is looking down';
  rsConditionalBranch_charLeft = '%s is looking left';
  rsConditionalBranch_charRight = '%s is looking right';

  rsConditionalBranch_charUpComboBox = 'Is looking up';
  rsConditionalBranch_charDownComboBox = 'Is looking down';
  rsConditionalBranch_charLeftComboBox = 'Is looking left';
  rsConditionalBranch_charRightComboBox = 'Is looking right';

  rsConditionalBranch_goldGtEq = '%s ≥ %s';
  rsConditionalBranch_goldLtEq = '%s ≤ %s';
  rsConditionalBranch_goldLt = '%s < %s';

  rsConditionalBranch_button = 'button %s is pressed';

  rsConditionalBranch_vehicleBoat = 'party is in the boat';
  rsConditionalBranch_vehicleShip = 'party is in the ship';
  rsConditionalBranch_vehicleAirship = 'party is in the airship';

  rsLoop = 'Loop';
  rsLoop_end = 'Repeat loop';
  rsBreakLook = 'Break loop';
  rsExitEventProcessing = 'Exit event processing';
  rsLabel = 'Label';
  rsGoto = 'Go to label';
  rsCallCommonEvent = 'Call common event';
  rsComment = 'Comment';

  rsChangeGold = 'Change Currency';
  rsChangeGold_add = '+ %s';
  rsChangeGold_remove = '- %s';
  rsChangeGold_currency = '%d %s';

  rsChangeItems = 'Change Items';
  rsChangeWeapons = 'Change Weapons';
  rsChangeArmours = 'Change Armours';
  rsChangeItemsWeaponsArmours_add = '%1-s + %0-s';
  rsChangeItemsWeaponsArmours_remove = '%1-s - %0-s';

  rsChangePartyMember = 'Change Party Member';
  rsChangePartyMember_add = 'add %s to party';
  rsChangePartyMember_remove = 'remove %s from party';
  rsChangePartyMember_reset = '(reset parameters)';

  rsChangeHp = 'Change HP';
  rsChangeMp = 'Change MP';
  rsChangeTp = 'Change TP';
  rsChangeHpMpTp_add = '%s, + %s';
  rsChangeHpMpTp_remove = '%s, - %s';
  rsChangeHp_allowKnockout = '(knockout allowed)';

  rsChangeState = 'Change state';
  rsChangeState_add = '%s, + %s';
  rsChangeState_remove = '%s, - %s';

  rsCompleteRecovery = 'Complete recovery';

  rsChangeExp = 'Change experience';
  rsChangeLevel = 'Change level';
  rsChangeExpLevel_add = '%s, + %s';
  rsChangeExpLevel_remove = '%s, - %s';

  rsChangeParam = 'Change parameter';
  rsChangeParam_add = '%s, %s + %s';
  rsChangeParam_remove = '%s, %s - %s';

  rsChangeSkill = 'Change skill';
  rsChangeSkill_learn = '%s, + %s';
  rsChangeSkill_forget = '%s, - %s';

  rsChangeEquipment = 'Change equipment';
  rsChangeEquipment_defined = '%s, %s = %s';
  rsChangeEquipment_none = '%s, %s = no equipment';

  rsChangeName = 'Change name';
  rsChangeName_expanation = '%s → %s';

  rsChangeClass = 'Change class';
  rsChangeClass_explanation = '%s, %s';
  rsChangeClass_keepLevel = '(retain level)';
  rsChangeClass_dontKeepLevel = '(don''t retain level)';

  rsChangeNickname = 'Change nickname';
  rsChangeNicknameProfile_explanation = '%s, %s';

  rsChangeProfile = 'Change profile description';

  rsTransferPlayer = 'Transfer player';
  rsTransferPlayer_explanation = '%s (%s, %s)';
  rsTransferPlayer_fadeNone = 'no fade';
  rsTransferPlayer_fadeWhite = 'white fade';

  rsSetVehicleLocation = 'Set vehicle location';
  rsSetVehicleLocation_explanation = '%s, %s (%s, %s)';

  rsSetEventLocation = 'Set event location: %s, %s';
  rsSetEventLocation_exchange = 'exchange with %s';

  rsScrollMap = 'Scroll map: %s, distance: %d, speed: %d';

  rsSetMoveRoute = 'Set movement route';
  rsSetMoveRoute_repeat = 'repeat';
  rsSetMoveRoute_skip = 'skip';
  rsSetMoveRoute_wait = 'wait';

  rsGetOnOffVehicle = 'Get on/off vehicle';
  rsChangePlayerVisibility_on = 'Set player visibility: VISIBLE';
  rsChangePlayerVisibility_off = 'Set player visibility: HIDDEN';
  rsChangePlayerFollowers_on = 'Display followers: ON';
  rsChangePlayerFollowers_off = 'Display followers: OFF';
  rsGatherFollowers = 'Gather followers';
  rsShowAnimation = 'Show animation: %s, %s';
  rsEmotionBalloonAnimation = 'Show emotion balloon: %s, %s';
  rsEraseEvent = 'Erase event';

  rsShowMovePicture_params = '%s, (%d%%, %d%%), %d, %s';
  rsShowMovePicture_centerPos = 'center at (%s, %s)';
  rsShowMovePicture_topLeftPos = 'top left at (%s, %s)';
  rsShowPicture = 'Show picture: #%d, %s, %s';
  rsMovePicture = 'Move picture: #%d, %s, %s';
  rsRotatePicture = 'Rotate picture: #%d, %d';
  rsTintPicture = 'Tint picture: #%d, (%d, %d, %d, %d), %s';
  rsErasePicture = 'Erase picture: #%d';

  rsWait = 'Wait';
  rsFadeoutScreen = 'Fadeout screen';
  rsFadeinScreen = 'Fadein screen';
  rsTintScreen = 'Tint screen: (%d, %d, %d, %d), %s';
  rsFlashScreen = 'Flash screen: (%d, %d, %d, %d), %s';
  rsShakeScreen = 'Shake screen: %d, %d, %s';
  rsSetWeatherEffect = 'Set weather effect: %s, %d, %s';
  rsSetWeatherEffect_none = 'Set weather effect: none, %s';
  rsPlayBgm = 'Play BGM';
  rsFadeoutBgm = 'Fadeout BGM';
  rsSaveBgm = 'Save BGM';
  rsReplayBgm = 'Replay BGM';
  rsPlayBgs = 'Play BGS';
  rsFadeoutBgs = 'Fadeout BGS';
  rsPlayMe = 'Play ME';
  rsPlaySe = 'Play SE';
  rsStopSe = 'Stop SE';
  rsPlayMovie = 'Play movie';
  rsBattleProcessing = 'Battle processing';
  rsBattleProcessing_asEncounter = 'same as random encounter';
  rsBattleProcessing_win = 'If won';
  rsBattleProcessing_escape = 'If escaped';
  rsBattleProcessing_lose = 'If lost';
  rsBattleProcessing_end = 'End';
  rsShopProcessing = 'Shop processing';
  rsNameInputProcessing = 'Name input processing: %s, %d letter(s)';
  rsOpenMenuScreen = 'Open menu screen';
  rsOpenSaveScreen = 'Open save screen';
  rsGameOver = 'Game over';
  rsReturnToTitleScreen = 'Return to title screen';

  rsChangeBattleBgm = 'Change battle BGM';
  rsChangeVictoryMe = 'Change victory ME';
  rsChangeDefeatMe = 'Change default ME';
  rsChangeVehicleBgm = 'Change vehicle BGM: %s, %s';

  rsChangeSaveAccess_on = 'Change save access: enable';
  rsChangeSaveAccess_off = 'Change save access: disable';
  rsChangeMenuAccess_on = 'Change menu access: enable';
  rsChangeMenuAccess_off = 'Change menu access: disable';
  rsChangeEncounter_on = 'Change encounters: enable';
  rsChangeEncounter_off = 'Change encounters: disable';
  rsChangeFormationAccess_on = 'Change formation access: enable';
  rsChangeFormationAccess_off = 'Change formation access: disable';

  rsChangeWindowColour = 'Change window colour: (%d, %d, %d)';
  rsChangeActorImages = 'Change actor images';
  rsChangeVehicleImage = 'Change vehicle image';

  rsChangeMapNameDisplay_on = 'Change map name display: show';
  rsChangeMapNameDisplay_off = 'Change map name display: hide';
  rsChangeTileset = 'Change tileset: %s';
  rsChangeBattleBack = 'Change battleback: %s';
  rsChangeParallax = 'Change parallax';
  rsChangeParallax_loopHorz = 'loop horizontally';
  rsChangeParallax_loopVert = 'loop vertically';

  rsGetLocationInfo = 'Get location info: %s, %s, (%s,%s)';
  rsGetLocationInfo_terrainTag = 'terrain tag';
  rsGetLocationInfo_eventId = 'event ID';
  rsGetLocationInfo_tileId = 'tile ID (layer %d)';
  rsGetLocationInfo_regionId = 'region ID';

  rsChangeEnemyHp = 'Change enemy HP';
  rsChangeEnemyMp = 'Change enemy MP';
  rsChangeEnemyTp = 'Change enemy TP';
  rsChangeEnemyState = 'Change enemy state';
  rsCompleteEnemyRecovery = 'Complete enemy recovery';
  rsEnemyAppear = 'Enemy appearance';
  rsEnemyTransform = 'Enemy transformation: %s → %s';
  rsShowBattleAnimation = 'Show battle animation: %s, %s';
  rsForceAction = 'Force action: %s, %s, %s';
  rsForceAction_lastTarget = 'last target';
  rsForceAction_randomTarget = 'random target';
  rsAbortBattle = 'Abort battle';
  rsScript = 'Script';
  rsPluginCommand = 'Plugin command';


  rsBattleBack = '%s & %s';

  rsEntireParty = 'entire party';
  rsEnemyNumber = 'Enemy #%d';
  rsEnemyNumberName = 'Enemy #%d %s';
  rsPlayerChar = 'player';
  rsThisEvent = 'this event';
  rsUnknownEventNumber = 'event #%d';

  rsCurrency = 'currency (gold)';
  rsIncludingEquipment = '(including equipment)';
  rsShowLevelUp = '(show level-up)';
  rsIndirectVariable = '{%s}';

  rsFadedWait = '(wait)';

  rsSound = '%s (%d, %d, %d)';
  rsImageWithIndex = '%s(%d)';

  rsButtonOk = 'OK';
  rsButtonCancel = 'Cancel';
  rsButtonShift = 'Shift';
  rsButtonUp = 'Up';
  rsButtonDown = 'Down';
  rsButtonLeft = 'Left';
  rsButtonRight = 'Right';
  rsButtonPageUp = 'PgUp';
  rsButtonPageDown = 'PgDown';

  rsTop = 'top';
  rsVertMiddle = 'middle';
  rsBottom = 'bottom';

  rsLeft = 'left';
  rsHorzMiddle = 'middle';
  rsRight = 'right';

  rsDirTop = 'top direction';
  rsDirBottom = 'bottom direction';
  rsDirLeft = 'left direction';
  rsDirRight = 'right direction';

  rsVehicleBoat = 'boat';
  rsVehicleShip = 'ship';
  rsVehicleAirship = 'airship';

  rsVehicleBoatComboBox = 'Boat';
  rsVehicleShipComboBox = 'Ship';
  rsVehicleAirshipComboBox = 'Airship';

  rsNotApplicable = '-';
  rsNumber = '#%d';
  rsPoints = '%d %s';

  rsColon = ': ';
  rsComma = ', ';
  rsSpace = ' ';
  rsOpenBracket = '(';
  rsCloseBracket = ')';
  rsFrames = '%d frame(s)';
  rsSeconds = '%d second(s)';
  rsWholeTroop = 'all enemies';

  rsNoFile = 'None';

  rsYes = 'Yes';
  rsNo = 'No';

  ItemTypeNormal = 'Normal item';
  ItemTypeKey = 'Key item';
  ItemTypeHiddenA = 'Hidden item A';
  ItemTypeHiddenB = 'Hidden item B';

  rsSelfSwitchA = 'A';
  rsSelfSwitchB = 'B';
  rsSelfSwitchC = 'C';
  rsSelfSwitchD = 'D';

  rsEquals = '=';
  rsGreaterOrEqualThan = '≥';
  rsLessOrEqualThan = '≤';
  rsGreaterThan = '>';
  rsLessThan = '<';
  rsNotEqual = '≠';

  rsMapCoordinates = '%s (X: %d, Y: %d)';
  rsNoMapCoordinates = 'none';

  rsTypeName = '%0.3d: %s';

implementation

function GetMaxParamValue(ParamId: Integer): Integer;
begin
  if ParamId < 2 then
    GetMaxParamValue := 9999
  else
    GetMaxParamValue := 999
end;

end.

